{% extends "common/base.html" %}
{% block main %}
    <div class="main-content item-box">
        <div class="item-type">
            <div class="column-item layui-row">
                <div class="column-item-title layui-row subject-color font-color1 font-bold">栏目简介</div>
                <div class="jianjie-p layui-row">这是博客当前栏目的简介信息，此处是技术文章栏目，主要分享一些编程技术或者知识点，以及一些Exception和莫名其妙的文章。</div>
            </div>
            <div class="column-item layui-row">
                <div class="column-item-title layui-row subject-color font-color1 font-bold">栏目文章分类</div>
                <ul class="column-item-ul">
                    <a href="#"><li>Java<span>15篇</span></li></a>
                    <a href="#"><li>PHP<span>6篇</span></li></a>
                    <a href="#"><li>C#<span>22篇</span></li></a>
                    <a href="#"><li>Android<span>6篇</span></li></a>
                    <a href="#"><li>Python<span>61篇</span></li></a>
                    <a href="#"><li>混合开发<span>12篇</span></li></a>
                    <a href="#"><li>SEO<span>33篇</span></li></a>
                    <a href="#"><li>SQL<span>41篇</span></li></a>
                </ul>
            </div>
        </div>
        <div class="item-list">
            <div class="list-param-sort layui-row">
                排序：<span><a href="#" class="chosen-sort">时间(默认)</a></span><span><a href="#">访问量</a></span><span><a href="#">评论数</a></span>
            </div>
            <ul class="article-ul">
               {% for article in page_obj.object_list %}
                <li>
                    <div class="article-list-row layui-row">
                        <div class="article-li-title layui-row">
                            <h3 class="font-bold layui-elip"><a href="content.html">{{ article.title }}</a></h3>
                        </div>
                        <div class="article-li-msg"><p>{{ article.description }}</p></div>
                        <div class="article-li-param layui-row">
                            2019-01-17 11:05<span>阅读数：529</span><span>评论数：11</span>
                        </div>
                    </div>
                </li>
               {% endfor %}
            </ul>
            <div class="page-box layui-row">
                <div id="pageItem">
                    <div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-1">
                        {% if page_obj.has_previous %}
                            <a href="{% url 'app:article_list2' page_obj.previous_page_number %}" class="layui-laypage-prev" data-page="0">上一页</a>
                        {% else %}
                            <a href="javascript:;" class="layui-laypage-prev layui-disabled" data-page="0">上一页</a>
                        {% endif %}
                {% for current in paginator.page_range %}
                        {#       判断是否是当前页             #}
{#                      {% ifequal current page %}#}
{#                        <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>{{ page }}</em></span>#}
{#                      {% else %}#}
                        <a href="{% url 'app:article_list2' current  %}" data-page="2">{{ current }}</a>
{#                     {% endifequal %}#}
                {% endfor %}
                        {% if page_obj.has_next %}
                           <a href="{% url 'app:article_list2' page_obj.next_page_number %}" class="layui-laypage-next" data-page="2">下一页</a>
                        {% else %}
                             <a href="javascript:;" class="layui-laypage-next  layui-disabled" data-page="2">下一页</a>
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block outer_js %}
<script src="../static/plugin/layui/layui.js"></script>
<script>

</script>
{% endblock %}
